<template>
  <div class="content">
    <div class="card" v-for="(v, i) in item" :key="i">
      <div class="left">
        <aside>{{ v.money ? v.money : "1" }}<b>元</b></aside>
        <article>
          <p>{{ v.name }}</p>
          <p>满{{ v.moneyHreshold }}元使用</p>
        </article>
      </div>
      <div>
        <button @click="click">{{ btn }}</button>
      </div>

      <footer>
        <p>领取7天内有效</p>
      </footer>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    item: Object,
    btn: String,
  },
  setup(p, { emit }) {
    function click() {
      emit("click");
    }
    return {
      click,
    };
  },
};
</script>

<style lang="scss" scoped>
.content {
  width: 100%;
  height: 100%;
  padding: 0 35px;
}
.card {
  width: 100%;
  background-color: #ec7877;
  height: 250px;
  border-radius: 20px;
  margin: 20px 0;
  font-size: 26px;
  display: flex;
  justify-content: space-between;
  padding-top: 50px;
  color: #fff;
  position: relative;
  overflow: hidden;
  .left {
    display: flex;
  }
  aside {
    height: 140px;
    text-align: center;
    font-size: 36px;
    margin: 30px;
    b {
      font-size: 26px;
    }
  }
  article {
    display: flex;
    flex-direction: column;
    height: 90px;
    justify-content: space-between;
  }
  button {
    background-color: #fce8e7;
    border: 0;
    outline: none;
    height: 50px;
    width: 130px;
    border-radius: 10px;
    color: #d45656;
    margin-right: 50px;
    font-size: 26px;
  }
  footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #cc7773;
    line-height: 70px;
    padding-left: 20px;
    p {
      font-size: 26px;
    }
  }
}
</style>
